package br.com.insula.twithis.processor.impl;

import net.rim.blackberry.api.mail.Message;
import net.rim.blackberry.api.mail.TextBodyPart;
import br.com.insula.twithis.processor.Payload;
import br.com.insula.twithis.processor.Processor;

public class MessageProcessor implements Processor {

	public Payload getPayload(Object context) {
		net.rim.blackberry.api.mail.Message message = (Message) context;

		TextBodyPart part = (TextBodyPart) message.getContent();

		return new MessagePayload(part.getContent().toString());
	}

}
